import request from '../utils/request'

export function page(data) {
    return request({
        url: '/uum-blog/api/v1/category/page',
        method: 'get',
        params: data
    })
}

export function categoryList() {
    return request({
        url: '/uum-blog/api/v1/category/list',
        method: 'get'
    })
}

export function detail(id) {
    return request({
        url: '/uum-blog/api/v1/category/detail/' + id,
        method: 'get'
    })
}

export function update(data) {
    return request({
        url: '/uum-blog/api/v1/category/update',
        method: 'put',
        data
    })
}

export function add(data) {
    return request({
        url: '/uum-blog/api/v1/category/add',
        method: 'post',
        data
    })
}

export function del(ids) {
    return request({
        url: '/uum-blog/api/v1/category/delete/' + ids,
        method: 'delete'
    })
}